package com.seuic.hnjiningposapp.hnapps.ui.view.dialog;

import android.app.Activity;
import android.content.Context;
import android.view.View;
import android.widget.Button;

import androidx.annotation.NonNull;

import com.lxj.xpopup.core.CenterPopupView;
import com.seuic.hnjiningposapp.R;

public class SurePrintPopup extends CenterPopupView {//确认打印纸
    Context context;
    Activity activity;
    private Button sure_printingpeper_okbtn;
    ClickCallback callevent;

    public SurePrintPopup(@NonNull Context context, Activity activity, ClickCallback callevent) {
        super(context);
        this.context = context;
        this.activity = activity;
        this.callevent = callevent;
    }

    @Override
    protected int getImplLayoutId() {
        return R.layout.dialog_sureprint;
    }
    public interface ClickCallback {
        void ToPrint();
    }
    @Override
    protected void onCreate() {
        super.onCreate();
        sure_printingpeper_okbtn = (Button) findViewById(R.id.sure_printingpeper_okbtn);
        sure_printingpeper_okbtn.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View view) {
                callevent.ToPrint();
            }
        });
    }

    protected void onShow() {
        super.onShow();
    }
}